<template>
  <view class="install">
    <view class="buts">
      <view class="quit" @click="logOut"> 退出登录 </view>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {};
    },
    computed: {},
    methods: {
      logOut() {
        uni.showModal({
          content: '您确定要退出吗？',
          confirmText: '确定',
          cancelText: '取消',
          success: function (res) {
            if (res.confirm) {
              // console.log('用户点击确定');
              // uni.setStorageSync('token', '')
              uni.setStorageSync('zhgx_ports', 'mj');
              uni.removeStorageSync('token');
              uni.removeStorageSync('appShopId');
              uni.removeStorageSync('appBaseId');
              uni.removeStorageSync('wxloginUserInfo');
              // uni.removeStorageSync('zhgx_ports')

              // uni.reLaunch({url: '/pages/register/register'})
              uni.switchTab({ url: '/pages/index/index' });
            } else if (res.cancel) {
              // console.log('用户点击取消');
            }
          },
        });
      },
    },
  };
</script>

<style scoped lang="scss">
  // uni-page-body{
  // 	height: 100%;
  .install {
    .buts {
      width: 95%;
      padding: 0 2%;
      position: absolute;
      bottom: 5%;
      left: 0%;
      view {
        width: 100%;
        height: 50px;
        background: #ffffff;
        border-radius: 10px;
        font-size: 20px;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 600;
        line-height: 50px;
        margin: 10px 0;
        text-align: center;
      }
      .switchover {
        color: $mainText;
      }
      .quit {
        color: #ff2929;
      }
    }
  }
  // }
</style>
